<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Javascript的Dom模型</title>
  <script>
    window.onload = function(){
      let d = document.querySelector('#hello');
      console.log(d);
      console.log(d.innerHTML);
      let ele = document.querySelector('#input');
      // ele.onblur = function(){
      //   console.log(this.value);
      //   d.innerHTML = this.value
      // }
      ele.oninput = function(){
        d.innerHTML = this.value
      }
    }
    
    
  </script>
</head>
<body>
  <div id="hello">hello world</div>
  <input type="text" id="input" placeholder="请输入内容">
</body>
</html>